﻿// SELECT.cpp: 实现文件
//

#include "pch.h"
#include "RockSccissorsPapers.h"
#include "afxdialogex.h"
#include "SELECT.h"
#include "RockSccissorsPapersDlg.h"


// SELECT 对话框

IMPLEMENT_DYNAMIC(SELECT, CDialogEx)

SELECT::SELECT(CWnd* pParent)
	: CDialogEx(IDD_SELECT, pParent),hardness(0)
{

}

SELECT::~SELECT()
{
}

void SELECT::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(SELECT, CDialogEx)
ON_BN_CLICKED(IDC_EasyMode, &SELECT::OnBnClickedEasymode)
ON_BN_CLICKED(IDC_NormalMode, &SELECT::OnBnClickedNormalmode)
END_MESSAGE_MAP()

void SELECT::OnBnClickedEasymode()
{
	hardness = 1;
	Sleep(500);
	ShowWindow(SW_HIDE);
	Sleep(1000);
	CRockSccissorsPapersDlg CRockSccissorsPapersDlg(hardness);
	CRockSccissorsPapersDlg.DoModal();
	Sleep(1000);
	ShowWindow(SW_SHOW);
}

void SELECT::OnBnClickedNormalmode()
{
	hardness = 2;
	Sleep(500);
	ShowWindow(SW_HIDE);
	Sleep(1000);
	CRockSccissorsPapersDlg CRockSccissorsPapersDlg(hardness);
	CRockSccissorsPapersDlg.DoModal();
	ShowWindow(SW_SHOW);
}